package com.yanqu.road.server.cmd.activity.dafuweng;

import com.yanqu.road.pb.monopoly.MonopolyProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.dafuweng.DaFuWengMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_DA_FU_WENG_UNION_NEWS_RED_HOT_NOTIFY_FROM_CROSS, desc = "跨服通知情报红点")
public class DaFuWengUnionNewsRedHotFromCrossCmd extends AbstractCommand {

    String unionUid;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        MonopolyProto.DaFuWengUnionNewsRedHotFromCrossReqMsg reqMsg = MonopolyProto.DaFuWengUnionNewsRedHotFromCrossReqMsg.parseFrom(packet.getBytes());
        unionUid = reqMsg.getUnionUid();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        DaFuWengMgr.syncUnionNewsRedHot(player, unionUid);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
